package cn.wenlihelp.mapper;

import cn.wenlihelp.bean.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Entity cn.cmy.bean.Role
 */
public interface RoleMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    List<Role> findAll(Role role);

    void deleteByIds(@Param("ids") Integer[] ids);

    List<Role> findByAccountId(@Param("accountId")Integer id);

    int deleteByRoleResourceMapping(@Param("roleId") Integer roleId);

    int addRoleResourceMapping(@Param("roleId")Integer roleId,@Param("resourceIds")Integer[] resourceIds);

}
